package com.yiba.vpn.config;

/**
 * 常量
 *
 * @author ScienJus
 * @date 2015/7/31.
 */
public class Constants {

    /**
     * 存储当前登录用户id的字段名
     */
    public static final String CURRENT_USER_ID = "CURRENT_USER_ID";

    /**
     * 刷新token的值
     */
    public static final String REFRESH_REDIS_VPN_PREFIX="REFRESH_TOKEN_PREFIX_";

    /**
     * 校验的值
     */
    public static final String REGISTER_REDIS_ACTIVETY_PREFIX="REGISTER_ACTIVETY_PREFIX_";

    /**
     * 忘记密码校验CODE
     */
    public static final String FORGET_PWD_REDIS__PREFIX="FORGET_PWD_REDIS__PREFIX_";
    /**
     * 修改密码凭证
     */
    public static final String UPDATE_PWD_REDIS__PREFIX="UPDATE_PWD_REDIS__PREFIX";

    /**
     * token有效期（秒）
     */
    public static final long TOKEN_EXPIRES_SECONDS = 7200;


    /**
     * 邮件发送恶意攻击Ip 禁止访问时间
     */
    public static final long BLACK_IP_DISABLE_VIST_RECORD = 12*7200;

    /**
     * 注册页面的uuid有效期（秒）10分钟
     */
    public static final long REGISTER_EXPIRES_SECONDS = 600;

    /**
     * IP存放有效期（秒）1分钟
     */
    public static final long IP_EXPIRES_SECONDS = 60;

    /**
     * 刷新token有效期（天）
     */
    public static final long REFRESH_TOKEN_EXPIRES_DAYS=3650;

    /**
     * 存放Authorization的header字段
     */
    public static final String AUTHORIZATION = "authorization";

    public static final String EMPTY_STRING = "";


    /**
     * 微信支付
     */
    public final static String SIGN_TYPE = "MD5";//签名加密方式

    public final static String API_KEY = "82fdf6b25b4b4260a6b406f5cb0a65c8";

    /**
     * 拦截器常量
     */
    public final static String CODE_STR = "code";
    public final static String MSG_STR = "msg";
    public final static String DATA_STR="data";
    public final static String CHARACTER_ENCODING="UTF-8";
    public final static String CONTENT_TYPE="application/json; charset=utf-8";

}
